package com.qing.expert.modules.expert.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qing.expert.modules.expert.entity.Expert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ExpertMapper extends BaseMapper<Expert> {

    /**
     * 更新达人评分
     */
    @Update("UPDATE expert SET rating = #{rating} WHERE expert_id = #{expertId}")
    void updateRating(@Param("expertId") String expertId, @Param("rating") Double rating);
}